import { LOGIN_TOKEN, LOGOUT } from '../contants/login'
const initialState = {
  token: '',
  refresh_token: '',
}

export const login = (state = initialState, action) => {
  const { type, payload } = action
  switch (type) {
    case LOGIN_TOKEN:
      return payload
    case LOGOUT:
      return {}
    default:
      return state
  }
}
